/**
 * Copyright &copy; 2015-2020 <a href="http://www.easyhis.com/">easyhis</a> All rights reserved.
 */
package com.easy.dfcapi.entity;

import javax.validation.constraints.NotNull;
import com.easy.modules.sys.entity.User;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.easy.core.persistence.DataEntity;
import com.easy.common.utils.excel.annotation.ExcelField;

/**
 * 订单处理Entity
 * @author waylen chi
 * @version 2018-01-17
 */
public class ApiOrderAction extends DataEntity<ApiOrderAction> {
	
	private static final long serialVersionUID = 1L;
	private Integer actionId;		// action_id
	private Integer orderId;		// 订单内部ID
	private User user;		// 处理操作员ID/用户ID
	private Integer userType;		// 处理人员类型（0—用户/1—店铺）
	private Integer actionType;		// 处理类型
	private String actionDesc;		// 本次处理描述
	private Date createTime;		// 处理日期，默认系统日期
	
	public ApiOrderAction() {
		super();
	}


	@NotNull(message="action_id不能为空")
	@ExcelField(title="action_id", align=2, sort=0)
	public Integer getActionId() {
		return actionId;
	}

	public void setActionId(Integer actionId) {
		this.actionId = actionId;
	}
	
	@ExcelField(title="订单内部ID", align=2, sort=1)
	public Integer getOrderId() {
		return orderId;
	}

	public void setOrderId(Integer orderId) {
		this.orderId = orderId;
	}
	
	@ExcelField(title="处理操作员ID/用户ID", fieldType=User.class, value=".userName", align=2, sort=2)
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}
	
	@ExcelField(title="处理人员类型（0—用户/1—店铺）", align=2, sort=3)
	public Integer getUserType() {
		return userType;
	}

	public void setUserType(Integer userType) {
		this.userType = userType;
	}
	
	@ExcelField(title="处理类型", align=2, sort=4)
	public Integer getActionType() {
		return actionType;
	}

	public void setActionType(Integer actionType) {
		this.actionType = actionType;
	}
	
	@ExcelField(title="本次处理描述", align=2, sort=5)
	public String getActionDesc() {
		return actionDesc;
	}

	public void setActionDesc(String actionDesc) {
		this.actionDesc = actionDesc;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ExcelField(title="处理日期，默认系统日期", align=2, sort=6)
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
}